import request from '@/utils/request'

// 创建领料出库单
export function createReceiveOut(data) {
  return request({
    url: '/wms/receive-out/create',
    method: 'post',
    data: data
  })
}

// 更新领料出库单
export function updateReceiveOut(data) {
  return request({
    url: '/wms/receive-out/update',
    method: 'put',
    data: data
  })
}

// 删除领料出库单
export function deleteReceiveOut(id) {
  return request({
    url: '/wms/receive-out/delete?id=' + id,
    method: 'delete'
  })
}

// 获得领料出库单
export function getReceiveOut(id) {
  return request({
    url: '/wms/receive-out/get?id=' + id,
    method: 'get'
  })
}

// 获得领料出库单分页
export function getReceiveOutPage(query) {
  return request({
    url: '/wms/receive-out/page',
    method: 'get',
    params: query
  })
}

// 导出领料出库单 Excel
export function exportReceiveOutExcel(query) {
  return request({
    url: '/wms/receive-out/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
